package com.ruoyi.slope.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.inspection.mapper.SlopeInspectionWeatherMapper;
import com.ruoyi.slope.inspection.domain.SlopeInspectionWeather;
import com.ruoyi.slope.inspection.service.ISlopeInspectionWeatherService;

/**
 * 气象条件观察巡检Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeInspectionWeatherServiceImpl implements ISlopeInspectionWeatherService 
{
    @Autowired
    private SlopeInspectionWeatherMapper slopeInspectionWeatherMapper;

    /**
     * 查询气象条件观察巡检
     * 
     * @param id 气象条件观察巡检主键
     * @return 气象条件观察巡检
     */
    @Override
    public SlopeInspectionWeather selectSlopeInspectionWeatherById(Long id)
    {
        return slopeInspectionWeatherMapper.selectSlopeInspectionWeatherById(id);
    }

    /**
     * 查询气象条件观察巡检列表
     * 
     * @param slopeInspectionWeather 气象条件观察巡检
     * @return 气象条件观察巡检
     */
    @Override
    public List<SlopeInspectionWeather> selectSlopeInspectionWeatherList(SlopeInspectionWeather slopeInspectionWeather)
    {
        return slopeInspectionWeatherMapper.selectSlopeInspectionWeatherList(slopeInspectionWeather);
    }

    /**
     * 新增气象条件观察巡检
     * 
     * @param slopeInspectionWeather 气象条件观察巡检
     * @return 结果
     */
    @Override
    public int insertSlopeInspectionWeather(SlopeInspectionWeather slopeInspectionWeather)
    {
        slopeInspectionWeather.setCreateTime(DateUtils.getNowDate());
        return slopeInspectionWeatherMapper.insertSlopeInspectionWeather(slopeInspectionWeather);
    }

    /**
     * 修改气象条件观察巡检
     * 
     * @param slopeInspectionWeather 气象条件观察巡检
     * @return 结果
     */
    @Override
    public int updateSlopeInspectionWeather(SlopeInspectionWeather slopeInspectionWeather)
    {
        slopeInspectionWeather.setUpdateTime(DateUtils.getNowDate());
        return slopeInspectionWeatherMapper.updateSlopeInspectionWeather(slopeInspectionWeather);
    }

    /**
     * 批量删除气象条件观察巡检
     * 
     * @param ids 需要删除的气象条件观察巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionWeatherByIds(Long[] ids)
    {
        return slopeInspectionWeatherMapper.deleteSlopeInspectionWeatherByIds(ids);
    }

    /**
     * 删除气象条件观察巡检信息
     * 
     * @param id 气象条件观察巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionWeatherById(Long id)
    {
        return slopeInspectionWeatherMapper.deleteSlopeInspectionWeatherById(id);
    }
}
